///////////////////////////////////////////////////////////////////////////////
//2013/11/20
//周俊
//基础图层实现
///////////////////////////////////////////////////////////////////////////////
#include "BaseLayer.h"

USING_NS_CC;
TSP_NS_START

BaseLayer::BaseLayer()
{
}

BaseLayer::~BaseLayer()
{
}

BaseLayer* BaseLayer::create()
{
    BaseLayer* layer = new BaseLayer();
    if ( !layer->init() )
    {
        delete layer;
        layer = nullptr;
    }
    return layer;
}

bool BaseLayer::init()
{
    if ( !cocos2d::Layer::init() )
    {
        return false;
    }

    return true;
}

void BaseLayer::onEnter()
{
    emit(kBeforeEnter, this);
    Layer::onEnter();
    emit(kAfterEnter, this);
}

void BaseLayer::onExit()
{
    emit(kBeforeExit, this);
    Layer::onExit();
    emit(kAfterExit, this);
}

TSP_NS_END